﻿@{
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
    ViewBag.Title = "test";
}
<div class="ibox ">
    <div class="ibox-content">
        <div class="row">
            <form class="form-horizontal col-sm-6" method="post" id="login-form">
                <div class="form-group">
                    <label class="col-sm-3 control-label">车牌：</label>
                    <div class="col-sm-9">
                        <input id="chepai" name="chepai" value="" />
                    </div>
                    <div class="col-sm-9">
                        <button type="button" id="but1">查询车辆状态</button>
                        <button type="button" id="but2">进场</button>
                        <button type="button" id="but3">出场</button>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">金额：</label>
                    <div class="col-sm-9">
                        <input id="fee" name="fee" value="" />
                    </div>
                    <div class="col-sm-9">
                        <button type="button" id="but4">无感缴费</button>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">订单号：</label>
                    <div class="col-sm-9">
                        <input id="ordID" name="ordID" value="" />
                    </div>
                    <div class="col-sm-9">
                        <button type="button" id="but5">订单查询</button>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">退款订单号：</label>
                    <div class="col-sm-9">
                        <input id="upOrdID" name="upOrdID" value="" />
                    </div>
                    <div class="col-sm-9">
                        <button type="button" id="but6">退款</button>
                        <button type="button" id="but7">退款查询</button>
                    </div>
                </div>
               <div class="form-group">
                    <label class="col-sm-3 control-label">费用操作：</label>
                    <div class="col-sm-9">
                         <button type="button" id="but8">预缴费用完成</button>
                        <button type="button" id="but9">现场缴费完成</button>
                         <button type="button" id="but10">费用查询操作</button>
                        </div>
                   </div>
            </form>
        </div>
    </div>
</div>
@section BodyFooter{
    <script>
        //查询车辆状态
        $('#but1').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(1, chepai, fee, ordID, upOrdID);
        })
        //进场
        $('#but2').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(2, chepai, fee, ordID, upOrdID);
        })
        //出场
        $('#but3').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(3, chepai, fee, ordID, upOrdID);
        })
        //无感缴费
        $('#but4').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(4, chepai, fee, ordID, upOrdID);
        })
        //订单查询
        $('#but5').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(5, chepai, fee, ordID, upOrdID);
        })
        //退款
        $('#but6').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(6, chepai, fee, ordID, upOrdID);
        })
        //退款查询
        $('#but7').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(7, chepai, fee, ordID, upOrdID);
        })
        //预缴费用完成
        $('#but8').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(8, chepai, fee, ordID, upOrdID);
        })
        //现场缴费完成
        $('#but9').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(9, chepai, fee, ordID, upOrdID);
        })
        //现场缴费完成
        $('#but10').click(function () {
            var chepai = $.trim($('#chepai').val());
            var fee = $.trim($('#fee').val());
            var ordID = $.trim($('#ordID').val());
            var upOrdID = $.trim($('#upOrdID').val());
            Open(10, chepai, fee, ordID, upOrdID);
        })
        var Open = function (type, chepai, fee, ordID, upOrdID) {
            $.postJsonAjax('/Admin/testPost', { type: type, chepai: chepai, fee: fee, ordID: ordID, upOrdID: upOrdID }, function (result) {
                alert("成功");
            });
        }
    </script>
}
